/** @file               sw_signal.h
 *  @copyright          Copyright (C) 2006-2026 flyfish (tenggui_fu@126.com)
 *  @brief              This file is part of the swallow library
 *  @author             $Author: Thinkpad $
 *  @version            $Rev: 403 $
 *  @date               $Date: 2016-12-27 10:53:11 +0800 (周二, 27 12月 2016) $
 */
#ifndef __SW_SIGNAL_H__
#define __SW_SIGNAL_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef SW_VOID (*SW_SIGNAL_PROC)(SW_INT32 sigid);

SW_API SW_RET SW_InitSignalAPI(SW_VOID);
SW_API SW_RET SW_RunSignalAPI(SW_VOID);
SW_API SW_RET SW_StopSignalAPI(SW_VOID);
SW_API SW_RET SW_ExitSignalAPI(SW_VOID);
SW_API SW_RET SW_BlockSignal(SW_INT32 sigid);
SW_API SW_BOOL SW_IsSignalBlocked(SW_INT32 sigid);
SW_API SW_RET SW_Signal(SW_INT32 sigid, SW_SIGNAL_PROC proc, SW_SIGNAL_PROC *pOldProc);
SW_API SW_RET SW_SignalAsync(SW_INT32 sigid, SW_SIGNAL_PROC proc, SW_SIGNAL_PROC *pOldProc);
SW_API SW_RET SW_SignalAuto(SW_INT32 sigid, SW_SIGNAL_PROC proc, SW_SIGNAL_PROC *pOldProc);

#ifdef __cplusplus
}
#endif

#endif
